﻿using System;
using System.Collections.Generic;

namespace GUI.BR
{
    using BLL;
    using EXT;
    public partial class frmMathangngungkinhdoanh : GUI.Danhmuc.ChitietDanhmuc.frmInputChitietDanhmuc
    {
        public frmMathangngungkinhdoanh()
        {
            InitializeComponent();
        }

        public event MyEvent_LoadData MyEvent_LoadData_Tailai = null;
        private void btnSudunglai_Click(object sender, EventArgs e)
        {
            HanghoaBLL Hanghoa_BLL = new HanghoaBLL();
            Hanghoa_BLL.Hanghoa_Delete1_Update(gvDanhsach.GetFocusedRowCellValue("Id").GetGuid());
            gcDanhsach.DataSource = Hanghoa_BLL.Hanghoa_Select_All_NotVali();
            if (MyEvent_LoadData_Tailai!=null)
            {
                MyEvent_LoadData_Tailai(this, new ELoadData() { IsLoadData=true});
            }
        }

        private void frmMathangngungkinhdoanh_Load(object sender, EventArgs e)
        {
            HanghoaBLL Hanghoa_BLL = new HanghoaBLL();
            gcDanhsach.DataSource = Hanghoa_BLL.Hanghoa_Select_All_NotVali();
        }
    }
}
